package com.demo.steammanagement.model.entity;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import lombok.Data;

/**
 * 兑换码信息
 */
@TableName(value ="redeem_code_info")
@Data
public class RedeemCodeInfo implements Serializable {

	@TableField(exist = false)
	private static final long serialVersionUID = 1L;
	
	/**
	 * NotRedeemed:未兑换, AlreadyRedeemed:已兑换
	 */
	public static final String STATUS_NOTREDEEMED = "NotRedeemed";
	public static final String STATUS_ALREADYREDEEMED = "AlreadyRedeemed";

	
	/**
	 * 主键
	 */
    @TableId(type = IdType.AUTO)
    private Long id;
    
    /**
     * 兑换码
     */
    private String redeemCode;
    
    /**
     * 角色 1.普通会员, 2.高级会员
     */
    private Integer userRole;
    
    /**
     * 状态 NotRedeemed:未兑换, AlreadyRedeemed:已兑换
     */
    private String status = STATUS_NOTREDEEMED;
    
    /**
     * 有效期(分钟)
     */
    private Long validity;
    
    /**
     * 兑换用户
     */
    private String userName;

}
